<template>
  <div ref="barChart"></div>
</template>

<script>
import * as echarts from "echarts";
export default {
  //初始化echart实例
  mounted() {
    let barChart = echarts.init(this.$refs.barChart);
    barChart.setOption({
      xAxis: {
        show: false,
        // 均分
        type: "category",
      },
      yAxis: {
        show: false,
      },
      series: [
        {
          type: "bar",
         data: [10,7,33,12,48,15,29,10,44,33,22,14]
        },
      ],
      //布局调试
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
      },
    });
  },
};
</script>

<style scoped>
#main {
  width: 1000px;
  height: 1000px;
}
</style> 